package com.explorati.design_pattern.behavior.observer;

import java.util.Observable;

public class Course extends Observable {

	private String CourseName;

	public Course(String courseName) {
		CourseName = courseName;
	}

	public String getCourseName() {
		return CourseName;
	}

	public void produceQuestion(Course course, Question question) {
		System.out.println(question.getUserName() + "在" + course.CourseName + "提交了一个问题");
		setChanged();
		notifyObservers(question);
		
	}

}
